.text                     # Start text section
#.balign 4                # align section to 4 bytes - which is also the default?
.global solve  	          # define global function symbol

solve:
	vsetvli t0, a0, e32, m2, ta, ma # Set vector length based on 32-bit vectors
	vle32.v v4, (a1)

	vmsne.vi v0, v4, 0

	vid.v v4, v0.t

	vse32.v v4, (a1)

	sub a0, a0, t0
	slli t0, t0, 2
	add a1, a1, t0

	bnez a0, solve
	ret
